Project Summary

The aim of this project was to evaluate whether or not geotagged social media data can be useful in providing insight into a region’s “Sense of Place” using Santa Barbara as a case study. Sense of Place can be defined as the connection people feel to their geographic surroundings, including both the natural and built environment. Locations with a strong sense of place often have a strong identity felt by both locals and visitors.

Geotagged social media data has been used in recent years to study people’s interaction with the natural environment in various ways, many of which are focused on tourism: - Quantifying nature-based tourism (Wood et al. 2013, Kim et al. 2019, ) - Mapping tourist footprints (Runge & Daigle 2020), flows (Chua et al. 2016), and hot spots (Garcia-Palomares et al. 2015) - Understand tourist preferences in nature based places such as Kruger National Park (Hausmann et al. 2017, Levin et al. 2017, Tenkanen et al. 2017) - Monitor and measure environmental conditions of places (e.g. Great Barrier Reef, Becken et al. 2017)

This project differs in that we wanted to map the spatial patterns of tourists and locals, and understand how these two user groups engage with and perceive the natural environment of Santa Barbara.

Findings

  • While the number of geotagged tweets has been decreasing overtime, the proportion of nature-based tweets has increased over time
  • Locals and tourists have similar spatial patterns with a higher proportion of tourists visiting more accessible, well-known areas, and a higher proportion of locals at locations further from the downtown Santa Barbara area.
  • Sentiment analysis reveal increasing positive sentiment over time for both nature based and non-nature based tweets.

Takeaways

  • There are opportunities to expand on these findings if compared to other locations of various sizes, but we are not pursuing a larger project at this time
  • Social media data is very difficult to access for academic research and recent restrictions limit the potential to scale this analysis up
  • Project findings will be published in a blog post and shared broadly via social media

Methods summary

  • Roughly 65,000 geotagged tweets were queried from April 30, 2015 to December 31, 2019.
  • Tourists and locals were identified using a two-step process based first on their stated location and then using the number of months a user tweeted from Santa Barbara within a year
  • Spatial patterns of tourists and locals were mapped
  • Nature-based tweets were identified using text detection by comparing tweet content to a compiled dictionary of nature-based words
  • The California Protected Areas Database (CPAD) was used to identify areas of importance for their natural environment, and overlaid with twitter data to reveal patterns about who visits these areas and content of tweets from these locations
  • Sentiment and text analysis were applied to tweet text to calculate positive/negative sentiment over time and identify important words for nature-based tweets

Data summary

Twitter data was obtained freely through a partnership between UCSB Library and Crimson Hexagon. Before downloading, the data was queried to meet the following conditions:

  1. Tweet came from the Santa Barbara area
  2. Only original tweets (no retweets)
  3. Date was marked between January 1, 2015 and December 31, 2019

Acessing Data

Crimson Hexagon only allows 10,000 randomly selected tweets to be exported, manually, at a time in .xls format. Due to this restriction, data was manually downloaded for every 2 days in order to capture all tweets. There were around 5000 average number of daily tweets that met these conditions.

The Crimson Hexagon data did not contain all desired information, including whether or not the tweet was geotagged. To get this information we used the python twarc library to “rehydrate” the data using individual tweet ids and store the tweet information as .json files. From here we were able to remove all tweets that did not have a geotag, giving us a total of 79,981 tweets (including Jan-Apr 2015).

Sample of twitter data

Month Day Time Year full_text user_location retweet_count favorite_count month_num date
Jan 27 18:22:17 2017 Prototyping & custom samples. 1 to 1000 it’s the same process. What can I make for you?… https://t.co/Rk8eOByHQ3 Santa Barbara, CA 0 0 1 2017-01-27
Jan 23 07:54:41 2016 Thank you @magicmenlive for a great time tonight… And I love my shirt!!! #magicmenlive… https://t.co/nmxqqI0iZR Port Hueneme, CA 1 5 1 2016-01-23
Jul 3 18:42:56 2015 Love you too isaadshaiikh #Pool #Love #Selfie @ Belmond El Encanto https://t.co/lqQeBoJ7J8 NA 0 0 7 2015-07-03
Mar 27 17:57:07 2016 Happy Easter from @thelarksb! We’re celebrating with an early Easter Supper, 4-9pm today. In… https://t.co/JPYnNU2NoL Santa Barbara 0 0 3 2016-03-27
Jun 14 02:21:28 2017 I recently found this quote and it really stuck with me - "if your dreams don’t scare you they… https://t.co/GZh79HGDWj Lima, Peru 0 0 6 2017-06-14
Nov 20 02:25:52 2016 My view behind the DJ booth for tonight’s Santa Barbara wedding. #santabarbarawedding… https://t.co/uA3HCPzrXs Orange County, California USA 0 2 11 2016-11-20
Aug 9 23:06:13 2016 One of the oldest Fig Tree in North America is in Santa Barbara, by the train station! Stop by… https://t.co/lPrELxR19f 1622 Copenhagen Dr.Solvang, CA 0 7 8 2016-08-09

Tweets over time

The number of geotagged tweets is going down over time. There is a significant drop in tweets at the end of April, 2015. It seems this is due “a change in Twitter’s ‘post Tweet’ user-interface design results in fewer Tweets being geo-tagged” ( source). The first 4 months of 2015 have 15,720 tweets, or roughly 19% of all tweets. To reduce a skew in the data and remove geotagged tweets that may have been geotagged without knowledge by the user in those months, we moved forward with all tweets from May 1, 2015 through the end of 2019.

Given that the tweet dataset is queried to just those that are geotagged - I hypothesize that most of these tweets have a picture or a link to an instagram post. We can detect links by looking for “t.co” in the tweet which is a twitter URL for a separate webpage. These are often twitter or instagram photos but we can’t be 100% certain.

It looks like 93% of geotagged tweets contain a link or picture.

Tweet maps

The spatial distribution of tweets highlights areas of higher population density and tourist areas in downtown Santa Barbara.

There is a single coordinate that has over 11,000 tweets reported across all years. It is near De La Vina between Islay and Valerio. There is nothing remarkable about this site so I assume it is the default coordinate when people tag “Santa Barbara” generally. The coordinate is 34.4258, -119.714.

As you zoom in on the map, clusters will disaggregate. You can click on blue points to see the tweet.

Tweet density

Each hexagon shows the log10 density of tweets in that area. The highest number of tweets in a single location is around 11,000 (yellow hex). This includes the default Santa Barbara coordinate used for geotagging from the city of Santa Barbara without a precise location


Analysis & Results

Tourists and locals

This project aims to understand if and how preferences differ between tourists and locals for nature-based places within the Santa Barbara area. In order to test this we needed to come up with a way to identify tourists or locals. We used a two step process.

First, if the user has self-identified their location as somewhere in the Santa Barbara area, they are designated a local. This includes Carpinteria, Santa Barbara, Montecito, Goleta, Gaviota and UCSB. For the remainder, we use the number of times they have tweeted from Santa Barbara within a year to designate user type. If someone has tweeted across more than 2 months in the same year from Santa Barbara, they are identified as a local. This is consistent with how Eric Fischer determined tourists in his work. This is not fool-proof and there are instances were people visit and tweet from Santa Barbara more than two months a year, especially if they are visiting family or live within a couple hours driving distance.

There are 21811 tweets from tourists and 45420 tweets from locals (32% and 68%). There are 12460 unique tourists and just 1893 unique local users.

Spatial preferences by user type

The following map shows areas that have more tweets from locals (orange) or tourists (purple). Note the values indicate the log10 of the absolute difference between number of tweets from each user group. If a hex is purple and has a value of 2, this means there are 100 times more tweets from tourists than locals at that location.

Nature-based tweets

The full text of each tweet was analyzed to be either nature-based or not. We developed a coarse dictionary of words that indicate a nature-based tweet. These include natural features like ocean, coast, park, and works that indicate recreating (fishing, hiking, camping, etc.).

Note: I had a hard time finding an ontology or lexicon that would fit this project. These are definitely skewed more towards nature and recreation rather than words like “home” or “connection”.

##  [1] "hike"        "trail"       "hiking"      "camping"     "tent"       
##  [6] "climb"       "summit"      "fishing"     "sail"        "sailing"    
## [11] "boat"        "boating"     "ship"        "cruise"      "cruising"   
## [16] "bike"        "biking"      "dive"        "diving"      "surf"       
## [21] "surfing"     "paddle"      "swim"        "ocean"       "beach"      
## [26] "[^a-z]sea"   "sand"        "coast"       "island"      "wave"       
## [31] "fish"        "whale"       "dolphin"     "pacific"     "crab"       
## [36] "lobster"     "water"       "shore"       "marine"      "seawater"   
## [41] "lagoon"      "slough"      "saltwater"   "underwater"  "tide"       
## [46] "aquatic"     "[^a-z]tree"  "[^a-z]earth" "weather"     "sunset"     
## [51] "sunrise"     "[^a-z]sun"   "climate"     "park"        "wildlife"   
## [56] "[^a-z]view"  "habitat"     "[^a-z]rock"  "nature"      "mountains"  
## [61] "[^a-z]peak"  "canyon"      "pier"        "wharf"       "environment"
## [66] "ecosystem"   "flower"

Let’s look at some examples of what tweets qualified as “nature-based”.

date full_text user_location user_type nature_word
2019-06-07 cauliflower seasoned with the salt-free seasoning makes a delicious dish! #theranchpantry #saltfreeseasoning #keto #frommypantrytoyours 📷 katbanditt @ the ranch pantry https://t.co/fsbfaeqaxs Santa Barbara, CA local 1
2016-12-29 waking up to this frosty sub zero british weather has me seriously craving the heat and warmth… https://t.co/jth0k2q736 London, England tourist 1
2017-05-13 i’m at tucker’s grove park in santa barbara, ca https://t.co/cv1jvdufeh Santa Barbara local 1
2017-01-09 breakfast before i head to the airport! 🍳🍴 @ boathouse at hendry’s beach https://t.co/upr8kfr5np Dallas, TX tourist 1
2019-11-26 range rover sport was treated with ceramic pro silver package for a good 5 year protection. https://t.co/5tszzaoboi @ sunshine auto spa & mobile detailing https://t.co/tgc4euyva5 santa barbara CA. local 1
2017-12-03 first family hike. henry is ready for the eastern sierra next! #seesb #getoutside @ jesusita trail https://t.co/vo5supfut0 Santa Barbara, California local 1
2019-06-03 sneek peek on just some of the art for drinks on me coaster art show at the press room. june 6th 7pm during 1st thursday! pressroomsb exploresantabarbara #drinksonmecoastershow2019 #artshow #1stthursday @ the press… https://t.co/o3oyozzqso 805 local 1

Proportion of tweets considered “nature-based” over time

All groups show increases in proportion of tweets that are nature based over time.

Where are nature-based tweets?

After identifying nature-based tweets we can take a look at where these tweets are coming from and compare to the general pattern of tweets.

Percentage of tweets that are nature-based across Santa Barbara

Who is tweeting nature-based tweets?

Not surprisingly there are less nature-based tweets than non-nature-based 24% of all geo-tagged tweets are nature-based.

Of local tweeters, 21% of tweets are nature-based. Of tourists, 30% are nature-based.

Are tweets in protected areas more often nature-based?

California Protected Areas Database

To link tweet locations to what exists at those locations we need to use a spatial dataset that tells us what is there. This could be roads, city parcel information, or in our case we are using protected areas from the California Protected Areas Database.

The CPAD is a GIS dataset depicting lands that are owned in fee and protected for open space purposes by over 1,000 public agencies or non-profit organizations.

We can look at the top 20 most popular tweeted-from sites. The green highlighted portion represents nature-based tweets. The number indicates what percentage of all tweets are nature-based at each site. Names in bold indicate over 50% of tweets are nature-based.

How does this differ across tourists and locals?

Looking at the breakdown between tourists and locals.

Do tourists and locals visit the same or different nature sites?

At the lower end we see more locals than tourists visiting these sites. These tend to be less popular areas. On the upper end, we see sites that are more frequented overall, and more frequented by tourists. These include well-known areas like the Santa Barbara Harbor and Stearn’s Wharf. Those on the lower end that locals frequent more are either lesser-known (Shoreline Park, Alameda Park are both neighborhood parks), or further from main tourist areas (e.g. Goleta Beach)

We only have 3846 unique users from within CPAD areas. This is 27% of all unique users in the dataset.


Text analysis

Using a Term Frequency-Inverse Term Frequency (TF-IDF) analysis we can identify words within tweets that are not only most common (e.g. “the”, “to”, “santa barbara”), but most “important”. TF-IDF is measure of how important a word is to a document in a corpus of documents, or in this case how important a word is to all nature-based tweets.

Most important words across all nature-based tweets in Santa Barbara

Most important words for a select number of CPAD areas

Sentiment Analysis

We can apply a sentiment analysis to the twitter data to try and understand patterns and trends in the general sentiment of tweets.

The top graph shows the total number of geotagged tweets, which has gone down over time across tourists and locals.

The bottom graph shows average daily sentiment scores over time. Above 0 is positive, below 0 is negative. We see that tweets are mostly positive and growing over time.

Changes over time

All tweets

Tourists

Locals


Future research opportunities

Examining scale

Applying the same or similar method to other regions of different geographic and population sizes could reveal more interesting information and provide context for the patterns and trends we see in Santa Barbara.

Is Santa Barbara unique in that:
- tourists and locals have similar spatial patterns - 24% of all geo-tagged tweets are nature-based - Proportion of nature-based tweets is increasing as geotagged tweets decrease overall, and positive sentiment is increasing over time

We might expect the tourist/local alignment to differentiate when looking at highly urban areas (LA, San Francisco), show more alignment in other suburban areas (e.g. Santa Cruz), and maybe not exist in rural locations.

If we look at proportion of tweets that are nature-based across these rural-suburban-urban scales, we may reveal where sentiments or Sense of Place around the natural environment are higher or lower. For example, we would expect a lower proportion of nature-based tweets in New York compared to Santa Barbara. We could also compare the city to state level. Across all geotgagged tweets in California, what is the proportion of nature-based tweets?

Areas for refinement

If this method is replicated going forward, there are a few areas where refinement and better data could be improved.

Identifying tourists and locals
If we had access to a larger twitter dataset, we could identify where tourists are “from” (or where they tweet more consistently) to confirm their tourist status, instead of relying on the number of months a user tweets within an area.

Nature-based dictionary
The dictionary compiled for this project was based solely on my own perspective of nature-based words. It also leaned heavily on what I would expect people to tweet about in Santa Barbara (e.g. “lobster”, “islands”, “wharf”). Ideally a dictionary used to identify nature-based tweets would be developed using more robust methods across a more geographically representative area.

Spatial data for natural areas
The CPAD dataset is good but not perfect. Some place names needed to be edited and some polygons needed to be fixed. This would not have been possible without extensive local knowledge of Santa Barbara. To scale this analysis to larger areas, you would want to ensure the underlying “natural area” dataset is appropriate.

Bias in data There is inherent bias in using social media data to draw broader conclusions about a community. Not everyone has access to social media or uses social media in a similar manner. There are differences across all demographics (genders, ages, ethinicities, economic status) and these were not taken into consideration during this project but should be considered if this is to be expanded upon.


Initial project goals and approach

Goals

  • Test the feasibility of analyzing location-based social media data to address questions about the scale and context of people’s sense of place
  • Conduct at least one of these analyses for Santa Barbara
  • Produce a research plan and objectives for a larger project, informed by the results of this proof of concept project, as a way to gauge interest and feasibility of pursuing additional phases of the project.

Proposed approach

  • Examine data availability and accessibility from social media platforms
  • Decide on two possible geographies of interest, informed by data availability
  • Extract geotagged data for each geography over a determined period of time. This is dependent on data availability but ideally we’d have data over a few years.
  • Apply existing methods to reveal patterns of sense of place
  • Analyze data for potential drivers (i.e., variables from the local context that reveal why a place is important) and interactions (e.g., connections between places)
  • Communicate results through a blog post and across social media platforms
  • Produce a proposal for next steps if this Proof of Concept proves a larger, more robust project is feasible

Supplemental figures and information

Additional figures to supplement the analysis.

Threshold for defining tourists/locals

If we just look at proportion of nature-based tweets we see a different ordering. I removed any places with just 1 tweet since it will skew results if that tweet happens to be nature-based (a total of 4 places).

What sites have no nature-based tweets?

This chart shows all CPAD areas and the proportion of tweets that are nature-based. The total number of tweets is represented by the width of the line.

Compare occurrence of nature vs non-nature based tweets

The highest ratio of nature tweets to non-nature takes place at Lookout Park and Beach.

What areas of Santa Barbara have over 50% nature-based tweets but are not within a designated CPAD area?

The idea here is to use the data to identify places where the majority of tweet content is nature-based but it does not align within a designated area. This could be used to indicate places that maybe should be recognized or protected but currently aren’t.

The top 10 positive and negative words found across all tweets. There are many more instances of the positive words than negative.

We see that generally “joy” and “positive” are the types of tweets we see most.

Word clouds

Top 100 words across all Santa Barbara geotagged tweets